#! /bin/bash

install_path="/opt/qt-5.12.8"

if [ " $1" != " " ]; then
    install_path=$1
fi

QT_INSTALL_PATH="-prefix $install_path"     #Qt安装路径(自己修改)
QT_COMPLIER+="-platform linux-g++-64"  #编译器

CONFIG_PARAM+="-shared "               #静态编译
CONFIG_PARAM+="-fontconfig "           #字体
#CONFIG_PARAM+="-static "                #静态编译 
CONFIG_PARAM+="-release "             #编译release
CONFIG_PARAM+="-recheck-all "
CONFIG_PARAM+="-nomake examples "    #不编译examples
CONFIG_PARAM+="-nomake tests "        #不编译tests

CONFIG_PARAM+="-qt-xcb "
CONFIG_PARAM+="-zlib "



#选择Qt版本(开源, 商业), 并自动确认许可认证
CONFIG_PARAM+="-opensource "         #编译开源版本, -commercial商业版本
CONFIG_PARAM+="-confirm-license "      #自动确认许可认证

echo "./configure $CONFIG_PARAM $QT_COMPLIER $QT_INSTALL_PATH"
./configure $CONFIG_PARAM $QT_COMPLIER $QT_INSTALL_PATH
